﻿<!DOCTYPE HTML>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="admin/head :: head" th:with="title=ctc统计">
</head>
<body>
<div class="layuimini-container">
	<div class="layuimini-main">
		<table class="layui-table">
			<thead>
			<tr class="text-c">
				<th width="80">币种名称</th>
				<th width="80">可用</th>
				<th width="80">冻结</th>
				<th width="80">锁仓</th>
				<th width="80">锁仓冻结</th>
			</tr>
			</thead>
			<tbody id="data">
			</tbody>
		</table>
	</div>
</div>
<script type="text/javascript" th:inline="javascript">

    $(function () {
        search();
    });

    function search(){
        var startDate=$("#startDate").val();
        var endDate=$("#endDate").val();
        $.ajax({
            url:"/admin/stat/walletStat",
            data:{"startDate":startDate,"endDate":endDate},
            dataType:"json",
            success:function(data){
                if(data.code==0){
                    var html="";
                    var d=data.obj;
                    for(var i=0;i<d.length;i++){
                        html+="<tr><td>"+d[i].currencyName+"</td><td>"+d[i].using+"</td><td>"+d[i].freeze+"</td><td>"+d[i].locking+"</td><td>"+d[i].lockFreeze+"</td></tr>";
                    }
                    $("#data").html(html);
                }
            }
        });
    }
</script>
</body>
</html>